Method and apparatus for inter prediction using motion vector candidate based on temporal motion prediction

ABSTRACT

An inter prediction method according to the present invention comprises: a step for deriving reference motion information related to a unit to be decoded in a current picture; and a step for performing motion compensation for the unit to be decoded, using the reference motion information that has been derived. According to the present invention, image encoding/decoding efficiency can be enhanced.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.16/887,370, filed on May 29, 2020, which is a continuation of U.S.application Ser. No. 16/456,629, filed on Jun. 28, 2019, which is acontinuation of U.S. application Ser. No. 13/989,126, having a 371(c)date of May 23, 2013, now U.S. Pat. No. 10,397,599, issued on Aug. 27,2019, which is a U.S. national stage application of InternationalApplication No. PCT/KR2011/009772, filed on Dec. 19, 2011, which claimsthe benefit of Korean Patent Application No. 10-2011-0137042, filed onDec. 19, 2011 and Korean Patent Application No. 10-2010-0130229, filedon Dec. 17, 2010 in the Korean Intellectual Property Office, the entiredisclosures of which ae incorporated herein by reference for allpurposes.

TECHNICAL FIELD

The present invention relates to image processing, and moreparticularly, to an inter prediction method and apparatus.

BACKGROUND ART

Recently, with the expansion of broadcasting services having highdefinition (HD) resolution in the country and around the world, manyusers have been accustomed to a high resolution and definition image,such that many organizations have conducted many attempts to developnext-generation image devices. In addition, the interest in HDTV andultra high definition (UHD) having a resolution four times higher thanthat of HDTV have increased and thus, a compression technology forhigher-resolution and higher-definition image have been required.

For the image compression, an inter prediction technology predictingpixel values included in a current picture from a picture before and/orafter the current picture, an intra prediction technology predictingpixel values included in a current picture using pixel information inthe current picture, an entropy encoding technology allocating a shortcode to symbols having a high appearance frequency and a long code tosymbols having a low appearance frequency, or the like, may be used.

DISCLOSURE Technical Problem

The present invention provides an image encoding method and apparatuscapable of improving image encoding/decoding efficiency.

The present invention also provides an image decoding method andapparatus capable of improving image encoding/decoding efficiency.

The present invention also provides an inter prediction method andapparatus capable of improving image encoding/decoding efficiency.

The present invention also provides temporal motion information encodingmethod and apparatus capable of improving image encoding/decodingefficiency.

The present invention also provides temporal motion information decodingmethod and apparatus capable of improving image encoding/decodingefficiency.

Technical Solution

In an aspect, there is provided an inter prediction method, including:deriving reference motion information on a decoding target unit within acurrent picture; and performing motion compensation on the decodingtarget unit by using the derived reference motion information, whereinthe reference motion information is motion information included in areference picture for the current picture and includes at least one of areference picture list, a reference picture index, a motion vector, aprediction direction, and a motion vector predictor.

The deriving of the reference motion information may further includeextracting the reference motion information from the reference picture.

The extracting of the reference motion information may further include:obtaining count information by counting occurrence frequency of each ofthe plurality of motion information within the reference picture; andselecting the reference motion information from the plurality of motioninformation within the reference picture, based on the obtained countinformation.

The extracting of the reference motion information may include: derivinga motion information median by performing median operation on the motioninformation within the reference picture; and extracting the motioninformation median as the reference motion information.

The extracting of the reference motion information may further includeperforming sub-sampling on the motion information within the referencepicture.

The sub-sampling may further include: selecting a block of apredetermined position among a plurality of blocks having a second sizeincluded in a block having a first size within the reference picture;and extracting the motion information corresponding to the selectedblock as the reference motion information, wherein each motioninformation within the reference picture may be stored in the block unithaving the second size.

The predetermined position may be a leftmost upper position within theblock having the first size.

The extracting of the reference motion information may further include:grouping the motion information within the reference picture into aplurality of groups; and selecting a predetermined number of motioninformation as the reference motion information in each of the pluralityof groups, based on the occurrence frequency of the motion information,wherein at the grouping, the grouping is performed based on at least onecharacteristic of a depth value of a unit included in the referencepicture, a size of the unit included in the reference picture, and apartition type of the unit included in the reference picture.

The extracting of the reference motion information may further include:dividing the reference picture into a plurality of regions; andselecting the predetermined number of motion information as thereference motion information in each of the plurality of regions, basedon the occurrence frequency of the motion information.

When the number of reference pictures is two or more, the extracting ofthe reference motion information may further include selecting thepredetermined number of motion information in each of the referencepictures, based on the occurrence frequency of the motion information.

The extracting of the reference motion information may include: derivinga temporal distance from the current picture for each of the referencepictures; and scaling the selected motion information based on thederived temporal distance.

The performing of the motion compensation may include: receiving anddecoding a motion information difference; deriving a predicted motionvector on the decoding target unit; deriving a motion vector on thedecoding target unit by using the decoded motion vector difference andthe derived predicted motion vector; and performing the motioncompensation on the decoding target unit by using the derived motionvector.

The deriving of the predicted motion vector may include: generating amotion vector candidate for the decoding target unit by using thereference motion information; and deriving the predicted motion vectorby using the motion vector candidate.

The performing of the motion compensation may include: receiving a mergeindex and decoding the received merge index; generating a mergecandidate list by using the reference motion information; selecting amotion information indicated by the merge index among the mergecandidates included in the merge candidate list; and performing themotion compensation for the decoding target unit by using the selectedmotion information.

When the number of reference motion information is two or more, theperforming of the motion compensation may include: receiving anddecoding the encoded motion information index; selecting the motioninformation indicated by the motion information index among thereference motion information; and performing the motion compensation onthe decoding target unit by using the selected motion information.

The deriving of the reference motion information may further include:receiving the encoded reference motion information; and decoding thereceived reference motion information.

When the number of encoded reference motion information is two or more,the decoding may decode the received reference motion information byusing differential pulse code modulation.

Advantageous Effects

The image encoding method according to the exemplary embodiments of thepresent invention can improve the image encoding/decoding efficiency.

Further, the image decoding method according to the exemplaryembodiments of the present invention can improve the imageencoding/decoding efficiency.

The inter prediction method according to the exemplary embodiments ofthe present invention can improve the image encoding/decodingefficiency.

Further, the temporal motion information encoding method according tothe exemplary embodiments of the present invention can improve the imageencoding/decoding efficiency.

Further, the temporal motion information decoding method according tothe exemplary embodiments of the present invention can improve the imageencoding/decoding efficiency.

DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram showing a configuration of an image encodingapparatus according to an exemplary embodiment of the present invention.

FIG. 2 is a block diagram showing a configuration of an image decodingapparatus to according to an exemplary embodiment of the presentinvention.

FIG. 3 is a conceptual diagram schematically showing an exemplaryembodiment in which a single unit is divided into a plurality of subunits.

FIG. 4 is a flow chart schematically showing a method for deriving aninter prediction method in an encoder according to an exemplaryembodiment of the present invention.

FIG. 5 is a diagram showing an exemplary embodiment of a referencepicture dividing method.

FIG. 6 is a diagram showing an exemplary embodiment of a referencepicture used for inter prediction and/or the motion compensation for anencoding target unit.

FIG. 7 is a flow chart schematically showing an inter prediction methodin a decoder according to an exemplary embodiment of the presentinvention.

MODE FOR INVENTION

Hereinafter, exemplary embodiments of the present invention will bedescribed in detail with reference to the accompanying drawings. Indescribing exemplary embodiments of the present invention, well-knownfunctions or constructions will not be described in detail since theymay unnecessarily obscure the understanding of the present invention.

It will be understood that when an element is simply referred to asbeing ‘connected to’ or ‘coupled to’ another element without being‘directly connected to’ or ‘directly coupled to’ another element in thepresent description, it may be ‘directly connected to’ or ‘directlycoupled to’ another element or be connected to or coupled to anotherelement, having the other element intervening therebetween. Further, inthe present invention, “comprising” a specific configuration will beunderstood that additional configuration may also be included in theembodiments or the scope of the technical idea of the present invention.

Terms used in the specification, ‘first’, ‘second’, etc. can be used todescribe various components, but the components are not to be construedas being limited to the terms. The terms are only used to differentiateone component from other components. For example, the ‘first’ componentmay be named the ‘second’ component without being departed from thescope of the present invention and the ‘second’ component may also besimilarly named the ‘first’ component.

Furthermore, constitutional parts shown in the embodiments of thepresent invention are independently shown so as to representcharacteristic functions different from each other. Thus, it does notmean that each constitutional part is constituted in a constitutionalunit of separated hardware or software. In other words, eachconstitutional part includes each of enumerated constitutional parts forconvenience. Thus, at least two constitutional parts of eachconstitutional part may be joined to form one constitutional part or oneconstitutional part may be divided into a plurality of constitutionalparts to perform each function. The embodiment where each constitutionalpart is joined and the embodiment where one constitutional part isdivided are also included in the scope of the present invention, if notdeparting from the essence of the present invention.

In addition, some of constituents may not be indispensable constituentsperforming essential functions of the present invention but be selectiveconstituents improving only performance thereof. The present inventionmay be implemented by including only the indispensable constitutionalparts for implementing the essence of the present invention except theconstituents used in improving performance. The structure including onlythe indispensable constituents except the selective constituents used inimproving only performance is also included in the scope of the presentinvention.

FIG. 1 is a block diagram showing a configuration of an image encodingapparatus according to an exemplary embodiment of the present invention.

Referring to FIG. 1 , an image encoding apparatus 100 includes a motionestimator 111, a motion compensator 112, an intra predictor 120, aswitch 115, a subtractor 125, a transformer 130, a quantizer 140, anentropy encoder 150, a dequantizer 160, an inverse transformer 170, anadder 175, a filter unit 180, and a reference picture buffer 190.

The image encoding apparatus 100 may perform encoding on input imageswith an intra mode or an inter mode to output bit streams. The intraprediction means intra-picture prediction and the inter prediction meansinter-picture prediction. In the case of the intra mode, the switch 115may be switched to intra and in the case of the inter mode, the switch115 may be switched to inter. The image encoding apparatus 100 maygenerate a prediction block for an input block of the input images andthen, encode residuals between the input block and the prediction block.

In the case of the intra mode, the intra predictor 120 may performspatial prediction using the pixel values of the previously encodedblocks around the current block to generate the prediction block.

In the inter mode, the motion estimator 111 may search a regionoptimally matched with the input block in the reference picture storedin the reference picture buffer 190 during the motion prediction processto obtain a motion vector. The motion compensator 112 may perform themotion compensation by using the motion vector to generate theprediction block. Here, the motion vector is a two-dimensional vectorused for inter prediction and may represent offset between a currentlyencoded/decoded picture and a reference picture.

The subtractor 125 may generate a residual block due to the residuals ofthe input block and the generated prediction block. The transformer 130may output transform coefficients by performing a transform on theresidual block. Further, the quantizer 140 may quantize the inputtransform coefficient according to quantization parameters to outputquantized coefficients.

The entropy encoder 150 may perform entropy encoding based on valuescalculated in the quantizer 140 or encoding parameter values, or thelike, calculated during the encoding process to output bit streams.

When the entropy encoding is applied, the entropy encoding may representsymbols by allocating a small number of bits to the symbols having highoccurrence probability and allocating a large number of bits to thesymbols having low occurrence probability, thereby reducing a size ofthe bit streams for encoding target symbols. Therefore, the compressionperformance of the video encoding may be increased through the entropyencoding. For the entropy encoding 150, an encoding method such asexponential golomb, context-adaptive variable length coding (CAVLC),context-adaptive binary arithmetic coding (CABAC), or the like, may beused.

The image encoding apparatus according to the exemplary embodiment ofFIG. 1 performs the inter prediction encoding, that is, theinter-picture prediction encoding and thus, the current encoded imageneeds to be decoded and stored so as to be used as the referencepicture. Therefore, the quantized coefficient may be dequantized in thedequantizer 160 and inversely transformed in the inverse transformer160. The dequantized, inverse transformed coefficients are added to theprediction block through the adder 175 to generate a reconstructedblock.

The reconstructed block passes through the filter unit 180 and thefilter unit 180 may apply at least one of a deblocking filter, sampleadaptive offset (SAO), and an adaptive loop filter to the reconstructedblock or a reconstructed picture. The filter unit 180 may also bereferred to as an adaptive in-loop filter. The deblocking filter mayremove a block distortion generated at a boundary between the blocks.The SAO may add a proper offset value to the pixel values so as tocompensate for coding error. The ALF may perform the filtering based onvalues obtained by comparing the reconstructed image with the originalimage. The reconstructed block passing through the filter unit 180 maybe stored in the reference picture buffer 190.

FIG. 2 is a block diagram showing a configuration of an image decodingapparatus to according to an exemplary embodiment of the presentinvention.

Referring to FIG. 2 , an image decoding apparatus 200 includes anentropy decoder 210, a dequantizer 220, an inverse transformer 230, anintra predictor 240, a motion compensator 250, an adder 255, a filterunit 260, and a reference picture buffer 270.

The image decoding apparatus 200 may receive the bit streams output fromthe encoder to perform the decoding with the intra mode or the intermode and output the reconstructed image, that is, the reconstructedimage. In the case of the intra mode, the switch may be switched to theintra and in the case of the inter mode, the switch may be switched tothe inter mode. The image decoding apparatus 200 obtains the residualblock from the received bit streams and generates the prediction blockand then, add the residual block and the prediction block, therebygenerating the reconstructed block, that is, the reconstructed block.

The entropy decoder 210 may perform the entropy encoding on the inputbit streams according to the probability distribution to generate thesymbols having the quantized coefficient type of symbols. The entropydecoding method is similar to the above-mentioned entropy encodingmethod.

When the entropy decoding method is applied, a small number of bits areallocated to the symbols having high occurrence probability and a largenumber of bits are allocated to the symbols having low occurrenceprobability to represent the symbols, thereby reducing a size of the bitstreams for each symbol. Therefore, the compression performance of theimage decoding may also be increased through the entropy decodingmethod.

The quantized coefficients are dequantized in the dequantizer 220 andare inversely transformed in the inverse transformer 230. The quantizedcoefficients may be dequantized/inversely transformed to generate theresidual block.

In the case of the intra mode, the intra predictor 240 may performspatial prediction using the pixel values of the previously encodedblocks around the current block to generate the prediction block. In thecase of the inter mode, the motion compensator 250 performs the motioncompensation by using the motion vector and the reference picture storedin the reference picture buffer 270, thereby generating the predictionblock.

The residual block and the prediction block are added through the adder255 and the added block passes through the filter unit 260. The filterunit 260 may apply at least one of the deblocking filter, the SAO, andthe ALF to the reconstructed block or the reconstructed picture. Thefilter unit 260 outputs the reconstructed images, that is, thereconstructed images. The reconstructed image may be stored in thereference picture buffer 270 so as to be used for the inter prediction.

Hereinafter, the unit means a unit of the image encoding and decoding.At the time of the image encoding and decoding, the coding or decodermeans the divided unit when performing the encoding and decoding bydividing the images, which may be called a coding unit (CU), a codingblock, a prediction unit (PU), a transform unit (TU), a transform block,or the like. The single unit may be subdivided into a lower block havinga smaller size.

Here, the prediction unit means a basic unit that is a unit performingthe prediction and/or the motion compensation. The prediction unit maybe divided into a plurality of partitions and each partition may also bereferred to as prediction unit partition. When the prediction unit isdivided into a plurality of partitions, each of the plurality ofpartitions may be referred to as a basic unit that is a unit ofperforming the prediction and/or the motion compensation. Hereinafter,in the exemplary embodiment of the present invention, each partition inwhich the prediction unit is divided may also be referred to as theprediction unit.

Meanwhile, as described above, an encoder and a decoder may perform theinter prediction and/or the motion compensation on the encoding/decodingtarget unit in the inter mode. In this case, the encoding/decodingtarget unit may mean the prediction unit and/or the prediction unitpartition. In this case, the encoder and decoder can improve theencoding/decoding efficiency by using the motion vector of areconstructed neighbor unit and/or a collocated unit. In this case, thereconstructed neighbor unit, which is a neighbor unit that is adjacentto the encoding/decoding target unit or is disposed at a corner of theencoding/decoding target unit, may mean a unit that is encoded ordecoded in advance and reconstructed. In addition, the collocated unitmay mean a unit that exists at the spatially same position as theencoding/decoding target unit within the reconstructed referencepicture. Hereinafter, the motion vector included in the referencepicture is referred to as a temporal motion vector. For example, themotion vector of the collocated unit may be referred to as the temporalmotion vector.

For example, the encoder and decoder may use the motion vector and/ortemporal motion vector of the reconstructed neighbor unit as the motionvector of the encoding/decoding target unit. In this case, theencoding/decoding target unit uses the motion vector and the temporalmotion vector of the reconstructed neighbor unit and thus, the encodermay not encode the motion vector for the encoding/decoding target unit.Therefore, the bit amount transmitted to the decoder may be reduced andthe encoding efficiency may be improved. An example of the interprediction mode may include a skip mode and/or a direct mode, or thelike.

In this case, the encoder may use an identifier and/or an indexindicating whether the motion vector of any unit of the reconstructedneighbor units is used. The inter prediction mode that uses theidentifier and/or index may be referred to as a merge mode.

As another example, the encoder and the decoder may use the motionvector of the encoding/decoding target unit to perform prediction and/orcompensation and then, may use the predicted motion vector for theencoding/decoding target unit when encoding the motion vector of theencoding/decoding target unit. Here, the predicted motion vector may bethe motion vector or the temporal motion vector of the reconstructedneighbor unit. That is, the encoder and decoder may use the motionvector or the temporal motion vector of the reconstructed neighbor unitas the predicted motion vector to efficiently encode the motion vectorof the encoding/decoding target unit.

The encoder may generate a motion vector difference by the residualsbetween the motion vector and the predicted motion vector of theencoding target unit. Here, the motion vector difference may mean thedifference value between the motion vector and the predicted motionvector of the encoding target unit. The encoder may encode the generatedmotion vector difference and transmit the encoded motion vectordifference to the decoder. In this case, the decoder may decode themotion vector difference and may derive the motion vector of thedecoding target unit through the sum of the decoded motion vectordifference and the predicted motion vector. The inter prediction methodmay be referred to as motion vector prediction (MVP). The MVP is usedsuch that the information amount transmitted from the encoder to thedecoder may be reduced and the encoding efficiency may be improved.

In this case, the encoder may use an identifier and/or an indexindicating whether the motion vector of any unit of the reconstructedneighbor units is used. The MVP that additionally uses the identifierand/or the index may be referred to as advanced motion vectorprediction.

In the above-mentioned skip mode, direct mode, merge mode, MVP, AMVP, orthe like, the motion information within the reference picture may beused for the prediction and/or the motion compensation of the currentencoding/decoding target unit. The motion information within thereference picture used for the prediction and/or the motion compensationof the current encoding/decoding target unit may be referred to as thetemporal motion information. An example of the temporal motioninformation may include the temporal motion vector, or the like.

Here, the motion information means the encoding parameter used for theinter prediction and the motion compensation. The encoding parameter mayinclude information that is encoded in the encoder like a syntax elementand transferred to the decoder and information that may be derivedduring the encoding or decoding process and means necessary informationat the time of encoding and decoding images. The motion information mayinclude at least one of a reference picture list, a reference pictureindex, a motion vector, a prediction direction, and a motion vectorpredictor.

Here, the reference picture list is a list configured as a plurality ofreference pictures used for the inter prediction. Two reference picturelists may be used for the inter prediction. One thereof may be referredto as reference picture list 0 and the other one thereof may be referredto as reference picture list 1. In this case, the prediction directionincluded in the motion information may be information indicating whetherany reference picture list is used at the time of the inter prediction.That is, the prediction direction may indicate whether the referencepicture list 0 is used, whether the reference picture list 1 is used, orwhether both of the reference picture list 0 and the reference picturelist 1 are used.

The reference picture index is an index indicating the reference pictureused for the inter prediction of the encoding/decoding target unit amongthe reference pictures included in the reference picture list. Further,the motion vector predictor may mean the unit that is predictioncandidates and/or the motion vector of the unit that is predictioncandidates, when the encoder and the decoder predict the motion vector.

The above-mentioned encoding parameter may include the motioninformation, the inter prediction mode, a coded block pattern (CBP), ablock size, values and/or statistics such as a block divisioninformation, or the like. In this case, the block division informationmay include information on a depth of the unit. The depth informationmay indicate a frequency and/or a degree that divides the unit.

FIG. 3 is a conceptual diagram schematically showing an exemplaryembodiment in which a single unit is divided into a plurality of subunits.

A single unit may have depth information and may be hierarchicallydivided, based on a tree structure. Each divided subunit may have thedepth information. The depth information indicates the frequency and/orthe degree in which the unit is divided and therefore, may also includethe information on the size of the subunit.

Referring to reference numeral 310 of FIG. 3 , the highest node may bereferred to as a root node and may have the smallest depth value. Inthis case, the highest node may have a depth of level 0 and may indicatethe first unit that is not divided.

The lower node having a depth of level 1 may indicate a unit in whichthe first unit is divided once and the lower node having a depth oflevel 2 may indicate a unit in which the first unit is divided twice.For example, in reference numeral 320 of FIG. 3 , unit a correspondingto node a is a unit which is divided once in the first unit and may havethe depth of level 1.

A leaf node of level 3 may indicate a unit in which the first unit isdivided three times. For example, in reference numeral 320 of FIG. 3 ,unit d corresponding to node d is a unit which is divided three times inthe first unit and may have the depth of level 3. Therefore, the leafnode of level 3 that is the lowest node may have the deepest depth.

As described above, the encoder and the decoder may use the temporalmotion information (for example, the temporal motion vector) when theinter prediction and/or the motion compensation are performed using theskip mode, the direct mode, the merge mode, the MVP, the AMVP, or thelike. However, the inter prediction method using the temporal motioninformation has a disadvantage in that the reference picture fore theencoding/decoding target picture needs to be stored in a memory. Inaddition, when the reference picture is lost, the motion information(for example, the temporal motion vector) within the reference picturemay not be used as it is and therefore, the errors may be propagatedaccording to the progress of the encoding/decoding process. Therefore,the inter prediction method using the temporal motion information mayhave a disadvantage in terms of error resiliency. Therefore, a needexists for the inter prediction method capable of efficientlyencoding/decoding motion information within the reference picture andimproving the error resiliency.

FIG. 4 is a flow chart schematically showing a method for deriving aninter prediction method in an encoder according to an exemplaryembodiment of the present invention.

Referring to FIG. 4 , the encoder may extract the motion information onthe reference picture for the current picture (S410). In this case, theencoder may extract N motion information among the motion informationincluded in the reference picture. The extracted motion information maybe used for the inter prediction and/or the motion compensation of theencoding target unit within the current picture. Here, N indicates apositive integer and in the exemplary embodiments as described below, Nmeans the positive integer.

Hereinafter, the exemplary embodiments of the method for extracting themotion information of the reference picture will be described. Theencoder may extract the motion information on the reference picture byusing at least one of the methods for extracting motion information tobe described below.

According to an exemplary embodiment of the method for extracting motioninformation, the encoder may extract the motion information according tothe motion information occurrence frequency within the referencepicture. In this case, for example, the encoder may select and extract Nmotion information among the motion information within the referencepicture in order of the occurrence frequency. The following Table 1shows the method for extracting motion information according to theinformation occurrence.

TABLE 1 Order of occurrence Motion frequency vector Count 1 [0, 0] 28392 [1, 0] 569 3 [0, −1] 432 4 [2, 0] 258 5 [1, 1] 129 6 [1, −1] 54 . . .. . . . . .

Referring to Table 1, the encoder counts the motion vector occurrencefrequency within the reference picture during the encoding process toobtain the count information. In this case, the encoder may select the Nmotion vector in order of the occurrence frequency. In the exemplaryembodiment of Table 1, when N is 3, the extracted motion vector may be[0,0], [1,0], and [0,−1].

As another example, the encoder may also obtain the count information oneach component of the motion vector rather than on the motion vectorduring the encoding process. Here, the motion vector may be representedby [x, y] with a two-dimensional vector type and thus, each componentmay means x component and y component. In this case, the encoder mayselect N component in order of the occurrence frequency for each of themotion vector components. The encoder may extract the N motion vectorsby using the selected motion vector components.

According to the exemplary embodiment of the present invention, theencoder may quantize the motion information of the reference picture andthen, count the occurrence frequency of the quantized motion informationto obtain the count information. For example, the encoder may quantizethe motion vector in a ¼ pixel unit with the motion vector of an integerpixel unit during the encoding process and count the occurrencefrequency of the quantized motion vector. In this case, the encoder mayselect and/or extract the N motion vectors in order of occurrencefrequency among the quantized motion vectors.

In this case, the encoder may perform the quantization for the motioninformation according to a quantization step size. The information onthe quantization step size may be identically stored in the encoder andthe decoder. In this case, the decoder may know the quantization stepsize used in the encoder and thus, the encoder may not transmit theinformation on the quantization step size to the decoder. When thedecoder does not have the information on the quantization step size, theencoder may encode the information on the quantization step size andtransmit the encoded information to the encoder through bit stream. Thedecoder decodes the information on the transmitted quantization stepsize and may use the decoded information to quantize the motioninformation.

According to another exemplary embodiment of the method for extractingmotion information, the encoder may perform a predetermined process on aplurality of motion information included in the reference picture toextract the temporal motion information. For example, the encoder mayperform a median operation on the plurality of motion informationincluded in the reference picture to extract the temporal motioninformation. For example, it is assumed that three motion vectors [0,0],[−3,5], and [−4,2] are present within the reference picture. In thiscase, the encoder may perform the median operation on each component ofthe motion vector to extract one motion vector [−3, 2].

As another exemplary embodiment of the present invention, the encodermay perform the sub-sampling on the plurality of motion informationincluded in the reference picture to extract the N motion information.For example, it is assumed that the motion vectors within the referencepicture are arranged in a two-dimensional type as in the following Table2.

TABLE 2 [−2, 4] [−1, 3] [0, −1] [2, 2] [1, 1] [0, 0] [−1, 1] [1, 1] [5,−1] [−3, 7] [−2, 1] [0, 0] [1, 3] [5, −4] [1, 1] [3, 3]

Referring to FIG. 2 , the encoder may extract the motion vector that ispresent in an odd numbered row and an odd numbered column in a motionvector arrangement in a two-dimensional type through the sub-sampling.In this case, four motion vectors such as [−2, 4], [0, −1], [5, −1],[−2, 1] may be extracted.

According to another exemplary embodiment of the present invention ofthe method for extracting N motion information by performing thesub-sampling on the plurality of motion information included in thereference picture, the encoder may extract the motion vectorcorresponding to the specific position in the motion vector arrangementin the two-dimensional type.

For example, when the motion vectors within the reference picture arearranged in the two-dimensional type as in Table 2, the encoder mayextract the motion vector corresponding to the specific position in thetwo-dimensional motion vector arrangement.

For example, the motion vectors may be stored in the motion vectorarrangement in the two-dimensional type in a 4×4 block unit. In thiscase, the encoder may select the block corresponding to thepredetermined position among blocks having a 4×4 size included in ablock having a 16×16 size and may extract the motion vectorcorresponding to the selected block. Here, the predetermined positionmay be the leftmost upper position within the block having 16×16 size.In the exemplary embodiment of Table 2, the predetermined position maybe a position corresponding to the motion vector [−2, 4]. In this case,the encoder may extract the motion vector of [−2, 4].

According to another exemplary embodiment of the method for extractingmotion information, the encoder may sort and/or group the motioninformation within the reference picture into a plurality of groups,based on characteristics of the unit included in the reference picture.The characteristics of the unit may be a depth of the unit, a size ofthe unit, and/or a partition type of the unit, or the like. In thiscase, the encoder may extract a total of N motion information byextracting M (hereinafter, M is a positive integer) motion informationaccording to the occurrence frequency for each group.

For example, when the depth value of the units within the referencepicture is present from 0 to P−1 (hereinafter, P is a positive integer),the encoder may sort the motion information within the reference pictureinto P group based on the depth value of the unit. In this case, theencoder may obtain the count information by counting the occurrencefrequency of the motion vector for each group during the encodingprocess. That is, the encoder may obtain the count information of themotion vector for each depth of the unit. The encoder may extract atotal of N motion vector by selecting the M motion vector in order ofoccurrence frequency for each group based on the count information.Here, N may be M*P.

According to the exemplary embodiment of the present invention, when theunit having a P kind of size is present within the reference picture,the encoder may sort the motion information within the reference pictureinto P groups based on the size of the unit. In this case, the encodermay obtain the count information by counting the occurrence frequency ofthe motion vector for each group during the encoding process. That is,the encoder may obtain the count information of the motion vector foreach size of the unit. The encoder may extract a total of N motionvector by selecting the M motion vector in order of occurrence frequencyfor each group based on the count information. Here, N may be M*P.

According to another exemplary embodiment of the present invention, whena P kind of partition type is present within the reference picture, theencoder may sort the motion information within the reference pictureinto P groups based on the partition type. In this case, the encoder mayobtain the count information by counting the occurrence frequency of themotion vector for each group during the encoding process. That is, theencoder may obtain the count information of the motion vector for eachpartition type. The encoder may extract a total of N motion vector byselecting the M motion vector in order of occurrence frequency for eachgroup based on the count information. Here, N may be N*P. Here, thepartition of the unit means the basic unit used for the inter predictionand the motion compensation and may have the size of L*K (L and K are apositive integer).

According to another exemplary embodiment of the present invention ofthe method for extracting motion information, the encoder may divide thereference picture into the plurality of regions. Here, each of theplurality of regions may be a region divided into a slice and theplurality of regions may have different motion vector generationdistribution. In this case, the encoder may extract a total of Ntemporal motion information by extracting M (hereinafter, M is apositive integer) motion information according to the occurrencefrequency for each region.

FIG. 5 is a diagram showing an exemplary embodiment of a referencepicture dividing method. Referring to FIG. 5 , the reference picture maybe divided into a first region 510 and a second region 520. Thefollowing Table 3 shows the exemplary embodiment of the method forextracting motion information according to the motion informationoccurrence frequency when the reference picture is divided into thefirst region 510 and the second region 520.

TABLE 3 First region Second region Order of Order of occurrence Motionoccurrence Motion frequency vector Count frequency vector Count 1 [0, 0]2839 1 [1, 0] 4320 2 [1, 0] 569 2 [0, −1] 224 3 [0, −1] 432 3 [0, 0] 1674 [2, 0] 258 4 [1, 1] 56 5 [1, 1] 129 5 [2, 0] 41 6 [1, −1] 54 6 [1, −1]29 . . . . . . . . . . . . . . . . . .

Referring to Table 3, the encoder may count the motion vector occurrencefrequency for each region during the encoding process to obtain thecount information. That is, the encoder may count the motion vectoroccurrence frequency for each of the first region 510 and the secondregion 520 to obtain the count information. In this case, the encodermay extract a total of N motion vector by selecting the M motion vectorin order of occurrence frequency for each group based on the countinformation. For example, when the reference picture is divided into tworegions and M is 3, the number of extracted motion vectors may be 6 intotal.

According to another exemplary embodiment of the present invention ofthe method for extracting motion information, when the plurality ofreference pictures for the encoding target unit and/or the currentpicture are used, the encoder may extract the M motion information foreach of the reference pictures according to the occurrence frequency toextract a total of N temporal motion information.

FIG. 6 is a diagram showing an exemplary embodiment of a referencepicture used for inter prediction and/or motion compensation for theencoding target unit. Referring to FIG. 6 , the current picture 630 mayinclude the encoding target unit. In this case, the first referencepicture 610 and the second reference picture 620 may be used for theinter prediction of the encoding target unit. The following Table 4shows the exemplary embodiment of the method for extracting motioninformation according to the motion information occurrence frequencywhen the plurality of reference pictures are used.

TABLE 4 First reference picture Second reference picture Order of Orderof occurrence Motion occurrence Motion frequency vector Count frequencyvector Count 1 [0, 0] 2839 1 [1, 0] 4320 2 [1, 0] 569 2 [0, −1] 224 3[0, −1] 432 3 [0, 0] 167 4 [2, 0] 258 4 [1, 1] 56 5 [1, 1] 129 5 [2, 0]41 6 [1, −1] 54 6 [1, −1] 29 . . . . . . . . . . . . . . . . . .

Referring to Table 4, the encoder may count the motion vector occurrencefrequency for each reference picture during the encoding process toobtain the count information. That is, the encoder may count the motionvector occurrence frequency for each of the first reference picture 610and the second reference picture 620 to obtain the count information. Inthis case, the encoder may extract a total of N motion vector byselecting the M motion vector in order of occurrence frequency for eachreference picture based on the count information. For example, when tworeference pictures are used and M is 3, the number of extracted motionvectors may be 6 in total.

According to another exemplary embodiment of the present invention ofthe method for extracting motion information, when the plurality ofreference pictures for the encoding target unit and/or the currentpicture are used, the encoder may also extract the M motion informationfor each of the reference pictures and scale the selected motioninformation to extract a total of N temporal motion information.

In this case, for example, the encoder may calculate a temporal distancefrom the current picture for each reference picture and perform thescaling by using the calculated temporal distance. Here, the temporaldistance may be a distance determined based on a display order when thecurrent picture and the plurality of reference pictures are arrange inthe display order.

For example, the encoder may count the motion vector occurrencefrequency for each reference picture during the encoding process toobtain the count information. That is, the encoder may count the motionvector occurrence frequency for each reference picture to obtain thecount information. In this case, the encoder may select a total of Nmotion vector by selecting the M motion vector in order of occurrencefrequency for each reference picture based on the count information.

The encoder may calculate the temporal distance from the current picturefor each of the reference pictures. The encoder may perform the scalingon the selected motion vector by using the calculated temporal distanceand may extract the scaled motion vector as the temporal motion vectorfor the current picture and/or the current encoding unit. In this case,when the plurality of motion vectors are equal to one another among thescaled motion vectors, the encoder may extract only the single motionvector as the temporal motion vector among the motion vectors equal toone another.

For example, it is assumed that the two reference pictures are used andeach of the reference pictures is the first reference picture and thesecond reference picture. In addition, it is assumed that the firsttemporal distance between the current picture and the first referencepicture is 2 and the second temporal distance between the currentpicture and the second reference picture is 4.

When the motion vector selected from the first reference picture is [0,2] and [1, 1] and the motion vector selected from the second referencepicture is [0, 4] and [2, 4], the selected motion vector may be [0, 2],[1, 1], [0, 4], and [2, 4]. In this case, the encoder may scale themotion vectors selected from the first reference picture and/or themotion vector selected from the second reference picture based on thefirst temporal distance and the second temporal distance. For example,when the motion vectors [0, 4] and [2, 4] selected from the secondreference picture are scaled, the scaled motion vector may be [0, 2] and[1, 2]. In this case, [0, 2] among the scaled motion vectors is equal tothe motion vector selected from the first reference picture andtherefore, the temporal motion vector finally extracted may beconfigured as {[0, 2], [1, 1], and [1, 2]}.

Meanwhile, the decoder may extract the motion information on thereference picture by using the same method as the method for extractingmotion information used in the encoder. In this case, the encoder maynot transmit the extracted motion information to the decoder. On theother hand, the process of extracting motion information as describedabove may also be performed only in the encoder rather than in thedecoder. In this case, the encoder may decode the extracted motioninformation and may transmit the decoded motion information to thedecoder.

Referring again to FIG. 4 , the encoder may perform the inter predictionand/or the motion compensation for the encoding target unit within thecurrent picture by using the extracted temporal motion information(S420).

For example, the encoder may use the extracted temporal motioninformation upon performing the motion vector prediction (MVP) and/orthe advanced motion vector prediction (AMVP) on the encoding targetunit. In this case, the encoder may use the temporal motion vectorextracted from the reference picture as one of the motion vectorcandidates. When the motion vector prediction and/or the AMVP isapplied, the encoder may perform the inter prediction and/or the motioncompensation by using a block matching algorithm, a skip mode, adirection mode, or the like.

The block matching algorithm may mean an algorithm that determines thereference unit for the encoding target unit among the reconstructedunits within the reference picture. The encoder may determine thereference unit for the encoding target unit among the reconstructedunits within the reference picture by using the motion vector of theencoding target unit. In this case, the encoder may perform the interprediction and/or the motion compensation for the encoding target unitby using the determined reference unit.

In the skip mode and the direct mode, the motion vector and the temporalmotion vector of the reconstructed neighbor unit may be used as themotion vector of the encoding target unit and the reference pictureindex of the reconstructed neighbor unit may be used as the referencepicture index of the encoding target unit. In the direct mode, theresidual signal for the current encoding target unit may be encoded andthen, may be transmitted to the decoder. However, in the skip mode, theresidual signal may not be present and therefore, the encoder may notencode the residual signal.

Another exemplary embodiment of the present invention, the encoder mayalso perform the inter prediction and/or the motion compensation byusing the merge mode. In the merge mode, the encoder may perform theinter prediction and/or the motion compensation by using at least one ofthe motion vector and the temporal motion vector of the reconstructedneighbor unit as the motion vector of the encoding target unit. In thiscase, the encoder may use the extracted temporal motion vector so as toderive the motion vector of the encoding target unit. For example, theencoder may use the extracted temporal motion vector as one of the mergecandidates included in a merge candidate list. That is, the encoder maygenerate the merge candidate list by using the extracted temporal motionvector.

In this case, the encoder may decode the merge index and then, maytransmit the encoded merge index to the decoder. Here, the merge indexmay be index indicating whether any of the merge candidates included inthe merge candidate list is used for the inter prediction and the motioncompensation of the encoding target unit. The decoder may receive anddecode the merge index and may generate the merge candidate list by thesame method as the encoder. In this case, the decoder may derive themotion information used for the inter prediction and the motioncompensation of the decoding target unit by using the generated mergecandidate list and the decoded merge index.

Further, the residual signal for the decoding target unit may not bepresent even in the merge mode. In this case, the encoder may not encodethe residual signal. The encoding mode may be referred to as a mergeskip mode.

Meanwhile, the temporal motion information extracted from the referencepicture may be two or more. In this case, the encoder may select one ofthe plurality of extracted temporal motion information and may use theselected temporal motion information for the inter prediction and/or themotion compensation for the encoding target unit. In this case, theencoder may select the optimized temporal motion information by arate-distortion optimization (RDO) method. Here, the rate-distortionoptimization method may mean the method for selecting an optimizeddecoding method in terms of the rate and the distortion.

For example, the encoder may calculate rate-distortion cost whenperforming the encoding on each of the plurality of temporal motionvectors. In this case, the encoder may select one temporal motion vectorhaving the minimum rate-distortion cost value. The encoder may use theselected temporal motion vector upon performing the inter predictionand/or the motion compensation. Further, the encoder may encode themotion vector index on the selected temporal motion vector and maytransmit the encoded motion vector index included in the bit stream tothe decoder.

The encoder may also use the temporal motion information extracted fromthe reference picture so as to encode the motion information of theencoding target unit. In this case, the temporal motion informationextracted from the reference picture may be used as the predicted valueon the motion information of the encoding target unit. Hereinafter, thepredicted value for the motion information of the encoding target unitis referred to as the predicted motion information and the predictedvalue for the motion vector of the encoding target unit is referred toas the predicted motion vector.

For example, the encoder may use the temporal motion vector extractedfrom the reference picture as the predicted motion vector for theencoding target unit. The encoder may obtain the motion vectordifference by the residuals between the motion vector and the predictedmotion vector of the encoding target unit. In this case, the encoder mayencode the obtained motion vector difference and may transmit theencoded motion vector difference included in the bit stream to thedecoder. The following Equation 1 represents the exemplary embodiment ofa method for calculating motion vector difference.motion_vector_difference=motion_vector−extracted_motion_vector  [Equation1]

Here, the motion_vector_difference may represent the motion vectordifference. In addition, the motion_vector may represent the motionvector of the encoding target unit and the extracted_motion_vector mayrepresent the temporal motion vector extracted from the referencepicture.

Referring again to FIG. 4 , the encoder may encode the motioninformation extracted from the reference picture and/or the informationrelated to the motion information (S430). The encoded informationincluded in a sequence parameter set (SPS), a picture parameter set(PPS), or a slice header for the encoding target unit may be transmittedto the decoder.

According to the exemplary embodiment of the present invention, theencoder may encode a motion information encoding indicator thatindicates whether the motion information extracted from the referencepicture is encoded and is transmitted to the decoder. In this case, themotion information encoding indicator may also indicate whether theextracted motion information is used for the inter prediction and themotion compensation. The encoded motion information encoding indicatorincluded in the bit stream may be transmitted to the decoder.

For example, the motion information encoding indicator may berepresented by a syntax element referred to ascoded_motion_vector_present_flag. The syntax element may be encoded inthe picture parameter set or the slice header.

When the value of the coded_motion_vector_present_flag is 1, the encodermay encode the extracted temporal motion information and may transmitthe encoded temporal motion information to the decoder. In this case,the decoder may decode the transmitted temporal motion information. Thedecoder may perform the inter prediction and the motion compensation forthe decoding target unit by using the decoded temporal motioninformation. When the value of the coded_motion_vector_present_flag is0, the encoder may not encode the extracted temporal motion information.In this case, the decoder may not use the extracted temporal motioninformation upon performing the inter prediction and the motioncompensation.

In addition, the encoder may encode the motion information valueextracted from the reference picture. The encoded motion informationvalue included in the bit stream may be transmitted to the decoder.

When the plurality of motion vectors are extracted from the referencepicture, the encoder may encode the extracted motion vector value byusing difference pulse code modulation (DPCM). In this case, the encodermay perform the prediction for each motion vector by using the DPCM.

For example, it is assumed that the two motion vectors are extractedfrom the reference picture. The extracted motion vector is referred toas a first motion vector and a second motion vector, respectively. Here,the first motion vector may be represented by extracted_motion_vector_1and the second motion vector may be represented byextracted_motion_vector_2. When the DPCM is used, the first motionvector value may be used as the predicted value for the second motionvector value. In this case, the encoder may obtain the motion vectordifference for the second motion vector by using the predicted value(first motion vector value) at the time of encoding the second motionvector value. This may be represented by, for example, the followingEquation 2.motion_vector_difference_2=extracted_motion_vector_2−extracted_motion_vector_1  [Equation2]

Here, the motion_vector_difference_2 may represent the motion vectordifference for the second motion vector. When the motion vectordifference is derived by the aforementioned method, the encoder mayencode the derived motion vector difference value and may transmit theencoded motion vector difference value to the decoder.

When the motion information extracted from the reference picture is 1,the encoder may encode the extracted motion information value withoutperforming the prediction on the extracted motion information. In thiscase, the encoded motion information value included in the bit streammay be transmitted to the decoder.

Meanwhile, as described above, the number of motion informationextracted from the reference picture may be two or more. When the numberof extracted motion information is 2 or more, the encoder may select oneof the plurality of extracted motion information and may use theselected motion information for the inter prediction and/or the motioncompensation for the encoding target unit. In this case, the encoder mayencode the motion information index indicating whether any of theplurality of extracted motion information is used. The encoded motioninformation index included in the bit stream may be transmitted to thedecoder.

The following Table 5 shows the exemplary embodiment of the extractedmotion vector when the number of motion vector extracted from thereference picture is 2 or more.

TABLE 5 Motion vector Index [0, 0] 0 [1, 0] 1 [0, −1] 2 [2, 0] 3 . . . .. .

Referring to Table 5, each motion vector may be allocated with themotion information index. For example, when [0, −1] of the plurality ofextracted motion vectors is used, the encoder may encode the motioninformation index value 2 and may transmit the encoded motioninformation index value to the decoder. In this case, the decoder mayderive the motion vector used for the inter prediction and the motioncompensation by using the transmitted motion information index.

When the motion information extracted from the reference picture is 1,the encoder may not encode the motion information index.

As described below, the decoder may extract the N (N is a positiveinteger) temporal motion information by the same method as the encoder.The extracted temporal motion information may be used for the interprediction and the motion compensation for the decoding target unit. Inthis case, the encoder may not encode the temporal motion informationvalue and/or the motion information index extracted from the referencepicture.

According to the aforementioned inter prediction method, the encoder mayefficiently encode the temporal motion information at the time ofencoding the image. In addition, the encoder may not store the motioninformation within the reference picture in the memory and therefore,may reduce the memory requirement and memory bandwidth and improve theerror resiliency at the time of the inter prediction and the motioncompensation for the encoding target unit. Therefore, the entire imageencoding efficiency can be improved.

FIG. 7 is a flow chart schematically showing an inter prediction methodin a decoder according to an exemplary embodiment of the presentinvention.

Referring to FIG. 7 , the decoder may extract the motion information onthe reference picture for the current picture (S710).

The decoder may extract N motion information among the motioninformation included in the reference picture. The extracted motioninformation may be used for the inter prediction and/or the motioncompensation of the decoding target unit within the current picture.Here, N indicates a positive integer and in the exemplary embodiments asdescribed below, N means the positive integer.

The decoder may extract the motion information on the reference pictureby using the same method as the method for extracting motion informationused in the encoder. In this case, the decoder may extract the samemotion information as the temporal motion information extracted from theencoder. The exemplary embodiments of the method for extracting motioninformation are described in FIG. 4 and therefore, the detaileddescription thereof will be omitted.

Meanwhile, as described above, the encoder may encode the motioninformation value extracted from the reference picture and may transmitthe encoded motion information value included in the bit stream to thedecoder. In this case, the decoder may derive the motion information ofthe reference picture from the transmitted bit stream and therefore, thedecoder may not perform the process of extracting motion information.

Referring again to FIG. 7 , the decoder may decode the motioninformation on the reference picture transmitted from the encoder and/orthe information related to the motion information (S720). The decodermay decode the information in a sequence parameter set (SPS), a pictureparameter set (PPS), or a slice header.

According to the exemplary embodiment of the present invention, thedecoder may decode a motion information encoding indicator thatindicates whether the temporal motion information extracted from theencoder is encoded and is transmitted to the decoder. In this case, themotion information encoding indicator may also indicate whether thetemporal motion information extracted from the encoder is used for theinter prediction and the motion compensation.

For example, the motion information encoding indicator may berepresented by a syntax element referred to ascoded_motion_vector_present_flag. The syntax element may be decoded inthe picture parameter set or the slice header.

When the value of the coded_motion_vector_present_flag is 1, the encodermay encode the temporal motion information extracted from the referencepicture and may transmit the encoded temporal motion information to thedecoder. In this case, the decoder may decode the transmitted temporalmotion information. The decoder may perform the inter prediction and themotion compensation for the decoding target unit by using the decodedtemporal motion information. When the value of thecoded_motion_vector_present_flag is 0, the encoder may not encode thetemporal motion information extracted from the reference picture. Inthis case, the decoder may not decode the extracted temporal motioninformation and may not use the extracted temporal motion informationupon performing the inter prediction and the motion compensation.

In addition, as described above, the encoder may encode the motioninformation value extracted from the reference picture and may transmitthe encoded motion information value to the decoder. In this case, thedecoder may receive and decode the transmitted motion information value.

When the plurality of motion vectors are extracted from the referencepicture, the encoder predicts the extracted motion vector value by usingthe DPCM and then, may encode the difference between the predictedmotion vector value and the extracted motion vector value, that is, themotion vector difference. The encoded motion vector difference may betransmitted to the decoder and the decoder may derive the temporalmotion information by using the transmitted motion vector difference.

For example, it is assumed that the two motion vectors are encoded inthe encoder. The encoded motion vector is referred to as a first motionvector and a second motion vector, respectively. Here, the first motionvector may be represented by extracted_motion_vector_1 and the secondmotion vector may be represented by extracted_motion_vector_2. When theDPCM is used, the first motion vector value may be used as the predictedvalue for the second motion vector value. In this case, as describedabove, the encoder may transmit the motion vector difference for thesecond motion vector to the decoder. Here, the motion vector differencefor the second motion vector may be represented by themotion_vector_difference_2.

The decoder may decode the first motion vector value. In addition, thedecoder decodes the motion vector difference for the second motionvector and the may derive the second motion vector value by adding thedecoded motion vector difference to the first motion vector value. Thismay be represented by, for example, the following Equation 3.extracted_motion_vector_2=motion_vector_difference_2+extracted_motion_vector_1  [Equation3]

When the motion information extracted from the reference picture is 1,the encoder may encode the extracted motion information value withoutperforming the prediction on the extracted motion information and maytransmit the encoded motion information value to the decoder. In thiscase, the decoder may decode the transmitted motion information valuewithout performing the prediction for the motion information.

Meanwhile, the number of motion information extracted from the referencepicture may be two or more. The motion information may be extracted fromthe encoder and may be transmitted to the decoder and may be extractedfrom the decoder. In this case, the decoder may select one of theplurality of motion information and may use the selected motioninformation for the inter prediction and/or the motion compensation forthe decoding target unit.

As described above, when the number of motion information extracted fromthe reference picture is 2, the encoder may encode the motioninformation index and may transmit the encoded motion information indexto the decoder. Here, the motion information index is an indexindicating whether any of the plurality of extracted motion informationis used. In this case, the decoder may decode the received motioninformation index. The decoder may have the plurality of motioninformation that is the same as the motion information extracted fromthe encoder and therefore, may select the motion information used forthe inter prediction and the motion compensation by using the decodedmotion information index.

The following Table 6 shows the exemplary embodiment of the extractedmotion vector when the number of motion vector extracted from thereference picture is 2 or more.

TABLE 6 Motion vector Index [0, 0] 0 [1, 0] 1 [0, −1] 2 [2, 0] 3 . . . .. .

Referring to Table 6, each motion vector may be allocated with themotion information index. For example, when the motion information indexvalue transmitted from the encoder is 2, the decoder may use the motionvector [0, −1], to which the index value of 2 is allocated, for theinter prediction and the motion compensation.

When the motion information extracted from the reference picture is 1,the encoder may not encode the motion information index. In this case,the encoder may not transmit the motion information index and therefore,the decoder may not decode the motion information index.

As described above, the decoder may extract the N (N is a positiveinteger) temporal motion information by the same method as the encoder.The extracted temporal motion information may be used for the interprediction and the motion compensation for the decoding target unit. Inthis case, the encoder may not encode the temporal motion informationvalue and/or the motion information index extracted from the referencepicture.

In this case, the decoder may not decode the motion information value,the motion information index, or the like. That is, the process ofdecoding the above-mentioned motion information value and motioninformation index, or the like, may be omitted.

The decoder may derive the temporal motion information of the referencepicture by the process of extracting motion information (S710) and/orthe process of decoding motion information (S720). The motioninformation of the reference picture derived from the decoder may be thesame as the temporal motion information extracted from the encoder.Hereinafter, the motion information of the reference picture derivedfrom the decoder is referred to as the reference motion information andthe motion vector of the reference picture derived from the decoder isrefereed to as the reference motion vector.

Referring again to FIG. 7 , the decoder may perform the inter predictionand/or motion compensation for the decoding target unit within thecurrent picture by using the reference motion information derived by theaforementioned method (S730).

For example, the decoder may use the reference motion information uponperforming the motion vector prediction (MVP) and/or the advanced motionvector prediction (AMVP) on the decoding target unit. In this case, thedecoder may use the reference motion vector as one of the motion vectorcandidates. When the motion vector prediction and/or the AMVP areapplied, the decoder may perform the inter prediction and/or the motioncompensation by using the reference motion vector.

In the skip mode and the direct mode, the motion vector and the temporalmotion vector of the reconstructed neighbor unit may be used as themotion vector of the decoding target unit and the reference pictureindex of the reconstructed neighbor unit may be used as the referencepicture index of the decoding target unit. In the direct mode, theresidual signal for the current decoding target unit may be decoded.However, in the skip mode, the residual signal may not be present andtherefore, the decoder may not decode the residual signal.

Another exemplary embodiment of the present invention, the decoder mayalso perform the inter prediction and/or the motion compensation byusing the merge mode. In the merge mode, the decoder may perform theinter prediction and/or the motion compensation by using at least one ofthe motion vector and the temporal motion vector of the reconstructedneighbor unit as the motion vector of the decoding target unit. In thiscase, the decoder may use the reference motion vector so as to derivethe motion vector of the decoding target unit. For example, the decodermay use the reference motion vector as one of the merge candidatesincluded in the merge candidate list.

Further, the residual signal for the decoding target unit may not bepresent even in the merge mode. In this case, the decoder may not decodethe residual signal. The decoding mode may be referred to as the mergeskip mode.

Meanwhile, the reference motion information derived from the decoder maybe two or more. In this case, the decoder may select one of theplurality of derived reference motion information and may use theselected reference motion information for the inter prediction and/orthe motion compensation for the encoding target unit. In this case, forexample, the decoder may decode the motion information index transmittedfrom the encoder and may select the reference motion information usedfor the inter prediction and the motion compensation by using thedecoded motion information index. Here, the motion information index mayindicate whether any of the plurality of derived reference motioninformation is used.

The decoder may use the reference motion information so as to derive themotion information of the decoding target unit. In this case, thereference motion information may be used as the prediction value on themotion information of the encoding target unit.

For example, the decoder may use the reference motion vector as thepredicted motion vector for the decoding target unit. Here, thepredicted motion vector may mean the predicted value for the motionvector of the decoding target unit. As described above, the encoder mayderive the motion vector difference between the motion vector of theencoding target unit and the motion vector extracted from the referencepicture and may transmit the derived motion vector difference to thedecoder. In this case, the decoder may receive and decode the motionvector difference and may derive the motion vector of the decodingtarget unit by adding the decoded motion vector difference to thereference motion vector. This may be, for example, represented by thefollowing Equation 4.motion_vector=motion_vector_difference+extracted_motion_vector  [Equation4]

Here, the motion_vector may represent the motion vector of the decodingtarget unit. In addition, the motion_vector_difference may represent themotion vector difference and the extracted_motion_vector may representthe reference motion vector.

According to the aforementioned inter prediction method, the decoder mayefficiently decode the temporal motion information at the time ofdecoding the image. In addition, the decoder may not store the motioninformation within the reference picture in the memory and therefore,may reduce the memory requirement and memory bandwidth and improve theerror resiliency at the time of the inter prediction and the motioncompensation for the decoding target unit. Therefore, the entire imagedecoding efficiency can be improved.

In the above-mentioned exemplary system, although the methods havedescribed based on a flow chart as a series of steps or blocks, thepresent invention is not limited to a sequence of steps but any step maybe generated in a different sequence or simultaneously from or withother steps as described above. Further, it may be appreciated by thoseskilled in the art that steps shown in a flow chart is non-exclusive andtherefore, include other steps or deletes one or more steps of a flowchart without having an effect on the scope of the present invention.

The above-mentioned embodiments include examples of various aspects.Although all possible combinations showing various aspects are notdescribed, it may be appreciated by those skilled in the art that othercombinations may be made. Therefore, the present invention should beconstrued as including all other substitutions, alterations andmodifications belong to the following claims.

The invention claimed is:
 1. A video decoding method, comprising:deriving spatial motion information from a neighboring unit of adecoding target unit; obtaining index information relating to temporalmotion information of the decoding target unit from a bitstream, whereinthe index information specifies a first reference picture having thetemporal motion information of the target unit among a plurality ofreference pictures in a reference picture list, and wherein theneighboring unit is adjacent to the decoding target unit or is disposedat a corner of the decoding target unit; selecting, based on the indexinformation, the first reference picture among the plurality of thereference pictures in the reference picture list; deriving the temporalmotion information from a collocated unit of the selected firstreference picture, the first reference picture having a differenttemporal order from a picture including the decoding target unit,wherein the temporal motion information includes motion vector of thecollocated unit; generating a merge candidate list for the decodingtarget unit including derived spatial motion information and the derivedtemporal motion information; performing motion compensation on thedecoding target unit by using the merge candidate list, generating aprediction block of the current block using a result of the motioncompensation; obtaining a residual block of the current block; andgenerating a reconstructed block of the current block by adding theprediction block and the residual block, wherein the step of performingthe motion compensation comprises: obtaining a merge index of thedecoding target unit; selecting motion information indicated by themerge index among merge candidates included in the merge candidate list;and performing the motion compensation for the decoding target unitusing the selected motion information.
 2. A video encoding method,comprising: deriving spatial motion information from a neighboring unitof an encoding target unit, wherein the neighboring unit is adjacent tothe encoding target unit or is disposed at a corner of the encodingtarget unit; deriving temporal motion information from a collocated unitof a first reference picture, the first reference picture having adifferent temporal order from a picture including the encoding targetunit, wherein the temporal motion information includes motion vector ofthe collocated unit; generating a merge candidate list for the encodingtarget unit including the derived spatial motion information and thederived temporal motion information; encoding, based on the mergecandidate list, a merge index of the encoding target unit; encodingindex information relating to the temporal motion information of theencoding target unit; obtaining a prediction block of the current block;obtaining a residual block of the current block based on the predictionof the current block; and encoding the residual block of the currentblock; wherein the index information specifies the first referencepicture having the temporal motion information of the encoding targetunit among a plurality of reference pictures in a reference picturelist.
 3. A non-transitory computer-readable recording-medium storing abitstream which is generated by a video encoding method, the methodcomprising: deriving spatial motion information from a neighboring unitof an encoding target unit, wherein the neighboring unit is adjacent tothe encoding target unit or is disposed at a corner of the encodingtarget unit; deriving temporal motion information from a collocated unitof a first reference picture, the first reference picture having adifferent temporal order from a picture including the encoding targetunit, wherein the temporal motion information includes motion vector ofthe collocated unit; generating a merge candidate list for the encodingtarget unit including the derived spatial motion information and thederived temporal motion information; encoding, based on the mergecandidate list, a merge index of the encoding target unit; encodingindex information relating to the temporal motion information of theencoding target unit; obtaining a prediction block of the current block;obtaining a residual block of the current block based on the predictionof the current block; and encoding the residual block of the currentblock; wherein the index information specifies the first referencepicture having the temporal motion information of the encoding targetunit among a plurality of reference pictures in a reference picturelist.